﻿@model ComicBookApp.Web.Models.CreatorDetailVM

<div class="row">
    <form class="form-group" method="post">
        <input type="text" class="form-control" name="name" value="@Model.Creator.Name" placeholder="Name..." />
        <input type="text" class="form-control" name="role" value="@Model.Creator.Role" placeholder="Role..." />
        <input type="hidden" name="Id" value="@Model.Creator.Id" />
        <input type="submit" class="form-control" value="Save Changes" />
    </form>
</div>
<div class="row">
    <form class="form-group" method="post" action="/Creator/Delete">
        <input type="hidden" name="Id" value="@Model.Creator.Id" />
        <input type="submit" class="form-control" value="Delete" />
    </form>
</div>
<div class="row">
    <table>
        <tr>
            <th>-</th>
            <th>Comic Books</th>
        </tr>
        @foreach (var comic in @Model.Comics)
        {
            <tr>
                <td>
                    <form method="post" action="/Creator/RemoveCreatorLink">
                        <input type="hidden" name="comicBookId" value="@comic.Id" />
                        <input type="hidden" name="creatorId" value="@Model.Creator.Id" />
                        <input type="submit" value="-Remove" class="btn btn-danger" />
                    </form>
                </td>
                <td>
                    @comic.Title
                </td>
            </tr>
        }
    </table>

</div>
